<template>
  <div class="app-container">
    <el-form ref="submitParams" :model="submitParams" :rules="rules" label-width="160px">
      <el-row>
        <el-col :offset="6" :span="8">
          <el-form-item :required="true" label="原交易流水号/原批次号：" prop="oriId">
            <el-input v-model="submitParams.oriId" />
          </el-form-item>
        </el-col>
      </el-row>

      <el-row>
        <el-col :offset="6" :span="12">
          <el-form-item>
            <el-button type="primary" @click="submitForm" v-loading.fullscreen.lock="loading">提 交</el-button>
            <el-button @click="refresh">重 置</el-button>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
import { businessStatQryEntrySave } from '@/api/cnaps/ccms/316'
import { listPageMixin } from '@/libs/listPageMixin'

export default {
  name: "BusinessStatQryEntry",
  mixins: [listPageMixin],
  components: {},
  data() {

    return {
      // 录入参数
      submitParams: {
        oriId: undefined,
      },
loading:false,
      //
      searchFormDictList: ["RETURNTYPECODE"],


      rules: {
        oriId :
          [
            {required: true,message: "请输入原交易流水号/原批次号",trigger: "blur"},
            { max: 20, message: "长度不超过20位", trigger: "blur" }
          ],
      }
    };
  },
  mounted() {


  },
  methods: {

    /** 提交按钮 */
    submitForm: function() {
      this.$refs["submitParams"].validate(valid => {
        if (valid) {
          this.loading=true
          businessStatQryEntrySave(this.submitParams).then(response => {
            this.msgSuccess("录入成功");
            this.refresh();
            this.loading = false;
          })
            .catch((err) => {
              this.loading = false;
            });
        }
      });
    },
    //点击重置按钮
    refresh(){
      this.resetForm("submitParams");
    },

  }
};
</script>
